Skip to content

Conversation

@Wanglongzhi2001
Copy link
Collaborator

@Wanglongzhi2001 Wanglongzhi2001 commented Aug 26, 2023

Load_model use reflection to revive LayerArgs and then revive Layer.

var argType = Assembly.Load("Tensorflow.Binding").GetType($"Tensorflow.Keras.ArgsDefinition.{class_name}Args");
if(argType is null)
{
return null;
}
var deserializationMethod = typeof(JToken).GetMethods(BindingFlags.Instance | BindingFlags.Public)

So each layer's args must be the pattern of {class_name}Args, otherwise it cannot be revived.

@Wanglongzhi2001
Copy link
Collaborator Author

Wanglongzhi2001 commented Aug 26, 2023

But there still exists some bug when use Merge Layer such as Add layer or Substract layer. When use Merge Layer, there will be some error when buildMap. So user arr better to not use Merge Layer at present.

@Oceania2018 Oceania2018 merged commit fed53f1 into SciSharp:master Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants